//function hideinfo()
//{ 
//   if(event.srcElement.tagName=="A")
//   {//如果触发函数的对象是链接 
//    //设置状态栏的显示为链接的文本 
//     window.status="HxCms"; 
//    } 
//   } 
//document.onmouseover=hideinfo           //鼠标移上时调用 hideinfo 函数 
//document.onmousemove=hideinfo          //鼠标移动时调用 hideinfo 函数 
//document.onmousedown=hideinfo         //鼠标按下时调用 hideinfo 函数 
//

var trIndex = 0;
var tmpIndex = 0;

function addItem(strname,strlength,container) {
    //trIndex++;
    //tmpIndex++;
    var containerObj = document.getElementById(container);
    //alert(1);
    //alert(containerObj.rows.length);
    var tr = containerObj.insertRow(containerObj.rows.length);
    var td = tr.insertCell(0);
    str = strname + String(containerObj.rows.length);
		temp="<span style=\"vertical-align:middle\"><iframe src=\"../system_include/upload.php?fieldname="+ str +"&fieldout=9\" width=\"310\" height=\"25\" scrolling=\"no\" marginwidth=\"0\" framespacing=\"0\" marginheight=\"0\" frameborder=\"0\" style=\"margin:0;padding:0;border:0;\"></iframe></span>";
    td.innerHTML = "<input id=\""+str+"\" name=\""+strname+"[]\" type=\"text\" style=\"width:"+(strlength)+"px\"> "+ temp + " <input name=\"del\" type=\"button\" value=\"删除\" style=\"color:#f00\" onclick=\"delItem("+String(containerObj.rows.length-1)+",'"+container+"');\"> ";   

}

/* 多行文本框上传功能问题加了这个JS模块 */
var trIndex2 = 0;
var tmpIndex2 = 0;

function addItem2(strname,strlength,container) {

    var containerObj = document.getElementById(container);
    var tr = containerObj.insertRow(containerObj.rows.length);
    var td = tr.insertCell(0);
    str = strname + String(containerObj.rows.length);
		//temp="<span style=\"vertical-align:middle\"><iframe src=\"../system_include/upload.php?fieldname="+ str +"&fieldout=9\" width=\"310\" height=\"25\" scrolling=\"no\" marginwidth=\"0\" framespacing=\"0\" marginheight=\"0\" frameborder=\"0\"></iframe></span>";
		temp = "";
    td.innerHTML = "<input id=\""+str+"\" name=\""+strname+"[]\" type=\"text\" style=\"width:"+(strlength-10)+"px\"> "+ temp + " <input name=\"del\" type=\"button\" value=\"删除\" style=\"color:#f00\" onclick=\"delItem2("+String(containerObj.rows.length-1)+",'"+container+"');\"> ";   

}

function addItem3(strname,strlength,container) {

    var containerObj = document.getElementById(container);
    var tr = containerObj.insertRow(containerObj.rows.length);
    var td = tr.insertCell(0);
    str = strname + String(containerObj.rows.length);
    str1 = 'Item_ID' + String(containerObj.rows.length);
		//temp="<span style=\"vertical-align:middle\"><iframe src=\"../system_include/upload.php?fieldname="+ str +"&fieldout=9\" width=\"310\" height=\"25\" scrolling=\"no\" marginwidth=\"0\" framespacing=\"0\" marginheight=\"0\" frameborder=\"0\"></iframe></span>";
		temp = "";
    td.innerHTML = "货号：<input id=\""+str1+"\" name=\"Item_ID[]\" type=\"text\" style=\"width:100px\">&nbsp;配色：<input id=\""+str+"\" name=\""+strname+"[]\" type=\"text\" style=\"width:200px\"> "+ temp + " <input name=\"del\" type=\"button\" value=\"删除\" style=\"color:#f00\" onclick=\"delItem2("+String(containerObj.rows.length-1)+",'"+container+"');\"> ";   
	//td.innerHTML = "<input id=\""+str+"\" name=\""+strname+"[]\" type=\"text\" style=\"width:"+(strlength-10)+"px\"> "+ temp + " <input name=\"del\" type=\"button\" value=\"删除\" style=\"color:#f00\" onclick=\"delItem2("+String(containerObj.rows.length-1)+",'"+container+"');\"> ";   
}

function addItem_jj(strname,strlength,container, fieldcontent) {

    var containerObj = document.getElementById(container);
    var tr = containerObj.insertRow(containerObj.rows.length);
    var td = tr.insertCell(0);
    str = strname + String(containerObj.rows.length);
	
	//temp = "<span style=\"vertical-align:middle\"><iframe src=\"../system_include/upload.php?fieldname="+ str +"&fieldout=9\" width=\"310\" height=\"25\" scrolling=\"no\" marginwidth=\"0\" framespacing=\"0\" marginheight=\"0\" frameborder=\"0\" style=\"margin:0;padding:0;border:0;\"></iframe></span>";

	//temp_str = '<script type="text/javascript">$(document).ready(function(){ $("#'+strname+'1").on(\'click\' , function(){ popWin.showWin("600","600","图片上传","../system_include/upload_c_img.php?fieldname='+strname+m+'&fieldout=9&fieldcontent='+fieldcontent+'"); });});</ script>&nbsp;<a href="javascript:void(0)" id="'+strname+'1">图片上传</a>';
	
	//tempstr = "<script type=\"text/javascript\">$(document).ready(function(){ $(\"#"+ strname +"1\").on(\"click\" , function(){ popWin.showWin(\"600\",\"600\",\"图片上传\",\"../system_include/upload_c_img.php?fieldname="+ strname +"&fieldout=9&fieldcontent="+ fieldcontent +"\"); });});</ script>&nbsp;<a href=\"javascript:void(0)\" id=\""+ strname +"1\">图片上传</a>";
	
	tempstr = "&nbsp;<a href=\"javascript:popWin.showWin('600','600','图片上传','../system_include/upload_c_img.php?fieldname="+ str +"&fieldout=9&fieldcontent="+ fieldcontent +"');\" id=\""+ str +"1\">图片上传</a>";
	
	//alert(tempstr);
	
    td.innerHTML = "<input id=\""+str+"\" name=\""+strname+"[]\" type=\"text\" style=\"width:"+(strlength)+"px\"> "+ tempstr + " <input name=\"del\" type=\"button\" value=\"删除\" style=\"color:#f00\" onclick=\"delItem2("+String(containerObj.rows.length-1)+",'"+container+"');\"> ";   

}


function delItem(trnum,container) {
    var containerObj = document.getElementById(container);
    var tr = containerObj.deleteRow(trnum);
    trIndex--;
}

function delItem2(trnum,container) {
    var containerObj = document.getElementById(container);
    var tr = containerObj.deleteRow(trnum);
    trIndex2--;
}
/*下面是日历控件调用的JS*/
document.write('<script type="text/javascript" src="../system_style/datejs/calendar.js"></script>')
document.write('<script type="text/javascript" src="../system_style/datejs/main.js"></script>')
